package cn.yunsenlin.formula.cloud.mysql;

import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * MyBatis扫描接口
 * Created by Richard on 2017/7/23.
 */
@SuppressWarnings("all")
@Configuration
public class MyBatisMapperScannerConfig {

    @Bean
    public static MapperScannerConfigurer mapperScannerConfigurer() {
        MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();
        mapperScannerConfigurer.setSqlSessionFactoryBeanName("sqlSessionFactory");
        mapperScannerConfigurer.setBasePackage("cn.yunsenlin.formula.cloud.mysql.mapper");
        return mapperScannerConfigurer;
    }
}